#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

void connect(char* arr1, char* arr2,int lg1,int st2)
{
	for (int i = 0; i < st2; i++)
	{
		*(arr1 + lg1 + i) = *(arr2 + i);
	}
}

int main()
{
	char arr1[100] = { 0 };
	char arr2[100] = { 0 };
	scanf("%s", &arr1);
	scanf("%s", &arr2);
	int len1 = strlen(arr1);
	int len2 = strlen(arr2);
	int len = len1 + len2;
	if (len1 > len2)
	{
		connect(arr1, arr2,len1,len2);
		
		printf("%s", arr1);
	}
	else
	{
		connect(arr2, arr1, len2, len1);

		printf("%s", arr2);
	}

	return 0;
}